import taichi as ti 

ti.init(arch = ti.cuda)

n = 512
res_x = n
res_y = n

pixels = ti.Vector.field(3, ti.f32,shape = (res_x, res_y))

@ti.kernel
def render ():
    for i,j in pixels :
        color = ti.Vector([0.0,0.0,0.0])
        pixels[i,j] = color

gui =ti.GUI("CANVAS",res=(res_x,res_y))

for i in range(1000000):
    render()
    gui.set_image(pixels)
    gui.show()


